package com.java.grammer.statics.exer1;

/**
 * 这道题 其实我写的有问题    因为total 是在方法区的静态域中，当后一个对象调用之后就是后一个对象的total
 * 所以不能在最后进行输出 第total 个客户  应该是 总客户数
 */
public class AccountTest {
    public static void main(String[] args) {
        Account account = new Account();
        Account account1 = new Account("140489", 2000);
        Account account2 = new Account("7788010", 5000);
        System.out.println("-----------------------");
        System.out.println(account.getTotal());
        System.out.println("---------------------------");
        System.out.println("客户id:" + account.getId() + "  客户密码:" + account.getPassd()
                + "  客户余额：" + account.getBalance());
        System.out.println("客户id:" + account1.getId() + "  客户密码:" + account1.getPassd() +
                "  客户余额:" + account1.getBalance() + "  这是第:" + account1.getId() + "个客户");
        account.print();
        account1.print();
        account2.print();
    }

}
